Turning a dial and illuminating a lamp (linking opacity and rotation values)The following example shows how to use the pick whip to simulate dimming a light bulb while rotating a dial. This expression links the opacity values to the rotation values so that as the rotation changes, the opacity changes too. Note: To learn what the text in an expression means, see Understanding the expression language. To link opacity values to rotation values:
thisComp.layer("switch.ai").rotation Note: Make sure to use rotation values that are compatible with the Opacity property. For example, opacity values range from 0 to 100, so rotating the switch layer backward using a negative value results in an opacity value of 0. ![]() Expression linking opacity and rotation. The "/5" modifier makes the change more gradual. |